﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.CompilerServices;

namespace GolfSigma.Inventory.Extension
{
    public static class GuidExtension
    {
        public static Guid? ToGuid(string guid)
        {
            Guid? result = (Guid?)null;

            // Must have something to parse
            if (string.IsNullOrEmpty(guid))
                return result;

            try
            {
                result = new Guid(guid);
            }
            catch { }

            // Return our Guid
            return result;
        }
    }
}
